import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;


public class StreamCopier implements Copier {

	@Override
	public void copy(InputStream src, OutputStream dst, int bufferSize) throws IOException {
		byte[] buffer = new byte[bufferSize];
		int size;
		while ((size = src.read(buffer)) != -1) {
			dst.write(buffer, 0, size);
		}
	}

}
